// --------------------------------------------------------------------------------------------------------------------
// <copyright file="CollectionCommandEventArgs.cs">
//   J. Prinz
// </copyright>
// <summary>
//   Eventarguments, passed to events assigned with Commands
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace AutomationMLMapper.ViewModels.CAEXObjectCollectionViewModels
{
    using System;
    using System.Windows.Input;

    /// <summary>
    /// Eventarguments, passed to events assigned with Commands on Collections
    /// </summary>
    /// <typeparam name="T">
    /// Type of Collection Items
    /// </typeparam>
    public class CollectionCommandEventArgs<T> : EventArgs
    {
        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="CollectionCommandEventArgs{T}"/> class. 
        /// Constructor
        /// </summary>
        public CollectionCommandEventArgs()
        {
            this.CancelCommand = false;
            this.AllowCommand = true;
        }

        #endregion

        #region Public Properties

        /// <summary>
        ///   Active Item for Command execution
        /// </summary>
        public T ActiveItem { get; set; }

        /// <summary>
        ///   Allow Command Execution
        /// </summary>
        public bool AllowCommand { get; set; }

        /// <summary>
        ///   Cancel Command Execution
        /// </summary>
        public bool CancelCommand { get; set; }

        /// <summary>
        ///   Command Interface
        /// </summary>
        public ICommand Command { get; set; }

        #endregion
    }
}